package cse3311.calendarapp;

import java.io.Serializable;
import java.util.GregorianCalendar;
import java.util.UUID;

public class Event implements Serializable {
	private static final long serialVersionUID = 2821275609545216410L;
	public UUID id_m;
	public String alias_m;
	public GregorianCalendar start_m;
	public String location_m;
	public String notes_m;
	public String color_m; // implement Color later if got the time
	public int reminderMinutes_m;

	public Event(EventData data) {
		id_m = data.id_m;
		alias_m = data.alias_m;
		start_m = data.start_m;
		notes_m = data.notes_m;
		location_m = data.location_m;
		color_m = data.color_m;
		reminderMinutes_m = data.reminderMinutes_m;
	}

	public String toString() {
		String myString;
		myString = "id: " + id_m + "\nalias: " + alias_m + "\nstart: "
				+ start_m + "\nnotes: " + notes_m + "\nlocation: " + location_m
				+ "\ncolor: " + color_m + "\nreminderMinutes: "
				+ reminderMinutes_m;
		return myString;
	}

	public EventData getEventData() {
		EventData data = new EventData();

		data.id_m = id_m;
		data.alias_m = alias_m;
		data.start_m = start_m;
		data.notes_m = notes_m;
		data.location_m = location_m;
		data.color_m = color_m;
		data.reminderMinutes_m = reminderMinutes_m;

		return data;
	}

	public void setEventData(EventData data) {
		id_m = data.id_m;
		alias_m = data.alias_m;
		start_m = data.start_m;
		notes_m = data.notes_m;
		location_m = data.location_m;
		color_m = data.color_m;
		reminderMinutes_m = data.reminderMinutes_m;
	}

	/*
	 * public boolean equals(Event event) { EventData data =
	 * event.getEventData(); return alias_m == data.alias_m && start_m ==
	 * data.start_m && end_m == data.end_m && notes_m == data.notes_m &&
	 * location_m == data.location_m && color_m == data.color_m &&
	 * reminderMinutes_m == data.reminderMinutes_m; }
	 */
}
